import request from '@/utils/request';

export default {
    /**
     * 条件+模糊+分页查询物流信息
     * @param {物流查询VO对象} logisticsQueryVO 
     * @returns 
     */
    getPage(logisticsQueryVO){
        return request({
            url: `/logistics/page`,
            method: 'post',
            data: logisticsQueryVO
        })
    },
    /**
     * 根据物流ID查询对象
     * @param {物流信息} logistics 
     * @returns 
     */
    updateLogisticsById(logistics){
        return request({
            url: `/logistics`,
            method: 'put',
            data: logistics
        })
    },
    /**
     * 根据物流Ids查询对象
     * @param {物流Ids} logisticsIds 
     */
    deleteLogisticsByIds(logisticsIds){
        return request({
            url: `/logistics`,
            method: 'delete',
            data: logisticsIds
        })
    },
    /**
     * 添加新物流
     * @param {物流信息} logistics 
     */
    addLogistics(logistics){
        return request({
            url: `/logistics`,
            method: 'post',
            data: logistics
        })
    },
    /**
     * 根据 ID 查询物流信息
     * @param {物流ID} logisticsId 
     */
    getDeitalById(logisticsId){
        return request({
            url: `/logistics/detail`,
            method: 'post',
            data: {logisticsId}
        })
    }
}

